package ModelLayer;


import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class personTester.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class PersonTester
{
    /**
     * Default constructor for test class personTester
     */
    public PersonTester()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }

    @Test
    public void createCustomer()
    {
        ModelLayer.Customer customer1 = new ModelLayer.Customer("Hans Olesen", "12992109", "Himmelvej", "Aalborg", "9000", 3);
    }

    @Test
    public void createEmployee()
    {
        ModelLayer.Employee employee1 = new ModelLayer.Employee("Ole Svenson", "9129190", "Finlandvej", "Aalborg", "9000", "OleSej", "1234", 24199, "Saelger");
    }

    @Test
    public void logOn()
    {
        PersonContainer personContainer = ModelLayer.PersonContainer.getInstance();
        ModelLayer.Employee employee1 = new ModelLayer.Employee("Ole Svenson", "9129190", "Finlandvej", "Aalborg", "9000", "OleSej", "1234", 24199, "Saelger");
        personContainer.addEmployee(employee1);
        personContainer.logOn("OleSej", "1234");
    }

    @Test
    public void findCustomer()
    {
        PersonContainer personContainer = ModelLayer.PersonContainer.getInstance();
        ModelLayer.Customer customer1 = new ModelLayer.Customer("Hans Olesen", "12992109", "Himmelvej", "Aalborg", "9000", 3);
        personContainer.addCustomer(customer1);
        personContainer.findCustomer("12992109", 10001);
    }
}


